#include "EqualizeHistogram.h"
#include <opencv2\imgproc\imgproc.hpp>

EqualizeHistogram::EqualizeHistogram(void) : Filter(1, 1)
{
}


EqualizeHistogram::~EqualizeHistogram(void)
{
}

void EqualizeHistogram::Process()
{
	std::vector<cv::Mat> channels;
	cv::split(*inputs[0], channels);
	for (std::vector<cv::Mat>::iterator it = channels.begin(); it != channels.end(); ++it)
	{
		cv::equalizeHist(*it, *it);
	}
	cv::merge(channels, outputs[0]);
	
}